package com.longan.sys.controller;

import cn.dev33.satoken.stp.StpUtil;
import com.longan.common.utils.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys")
public class TestController {

    @GetMapping("/not_need_login")
    public AjaxResult test0() {
        System.out.println("这是不需要登录就能访问的接口");
        return AjaxResult.success();
    }

    @GetMapping("/must_login")
    public AjaxResult test1() {
        System.out.println("我登录了");
        return AjaxResult.success("这是登录后的返回");
    }
}
